<?php
/**
 * Created by PhpStorm.
 * User: eugene
 * Date: 2018/6/4
 * Time: 13:15
 */

namespace App\Admin\Tools;

use Illuminate\Support\Facades\DB;

class Clear
{
    
    public static function user($user_id=null)
    {
        DB::table('park_member')->where('uid',$user_id)->delete();
        DB::table('park_messages')->where('user_id',$user_id)->orWhere('to_user_id',$user_id)->delete();
        DB::table('park_mycar')->where('uid',$user_id)->delete();
        DB::table('park_mystage')->where('uid',$user_id)->delete();
        DB::table('park_parkings')->where('user_id',$user_id)->delete();
        DB::table('user_draw_lots_log')->where('user_id',$user_id)->delete();
        DB::table('user_gold_log')->where('user_id',$user_id)->delete();
        DB::table('user_lottery_log')->where('user_id',$user_id)->delete();
        DB::table('park_record')->where('ParkUid',$user_id)->orWhere('ParkWhoUid',$user_id)->delete();
        DB::table('card_series_award_logs')->where('user_id',$user_id)->delete();
        DB::table('merchant_logs')->where('user_id',$user_id)->delete();
        DB::table('friends')->where('user_id',$user_id)->orWhere('to_user_id',$user_id)->delete();
        
    }
}